Skip hydration errors when a view transition has been applied#35380
Merged
sebmarkbage merged 1 commit intofacebook:mainfrom Dec 17, 2025
Merged
Skip hydration errors when a view transition has been applied#35380sebmarkbage merged 1 commit intofacebook:mainfrom
sebmarkbage merged 1 commit intofacebook:mainfrom
Conversation
|
Comparing: 88ee1f5...f680976 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
gaearon
approved these changes
Dec 17, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Dec 17, 2025
When the Fizz runtime runs a view-transition we apply `view-transition-name` and `view-transition-class` to the `style`. These can be observed by Fiber when hydrating which incorrectly leads to hydration errors. More over, even after we remove them, the `style` attribute has now been normalized which we are unable to diff because we diff against the SSR generated `style` attribute string and not the normalized form. So if there are other inline styles defined, we have to skip diffing them in this scenario. DiffTrain build for [f93b9fd](f93b9fd)
github-actions bot
pushed a commit
that referenced
this pull request
Dec 17, 2025
When the Fizz runtime runs a view-transition we apply `view-transition-name` and `view-transition-class` to the `style`. These can be observed by Fiber when hydrating which incorrectly leads to hydration errors. More over, even after we remove them, the `style` attribute has now been normalized which we are unable to diff because we diff against the SSR generated `style` attribute string and not the normalized form. So if there are other inline styles defined, we have to skip diffing them in this scenario. DiffTrain build for [f93b9fd](f93b9fd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the Fizz runtime runs a view-transition we apply
view-transition-nameandview-transition-classto thestyle. These can be observed by Fiber when hydrating which incorrectly leads to hydration errors.More over, even after we remove them, the
styleattribute has now been normalized which we are unable to diff because we diff against the SSR generatedstyleattribute string and not the normalized form. So if there are other inline styles defined, we have to skip diffing them in this scenario.